package com.ruoyi.web.controller.his;

import java.util.List;


import com.ruoyi.his.domain.*;
import com.ruoyi.his.service.*;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;

/**
 * 省Controller
 * 
 * @author Alan
 * @date 2024-03-09
 */
@RestController
@RequestMapping("/his/province")
public class ReProvinceController extends BaseController
{
    @Autowired
    private IReProvinceService reProvinceService;

    @Autowired
    private IReAreaService reAreaService;

    @Autowired
    private IReCityService reCityService;

    @Autowired
    private IReStreetService reStreetService;

    @Autowired
    private IReVillageService reVillageService;

    /**
     * 查询省列表
     */
    @GetMapping("/listProvince")
    public List<ReProvince> listProvince(ReProvince reProvince)
    {
        List<ReProvince> list = reProvinceService.selectReProvinceList(reProvince);
        return list;
    }
    @GetMapping("/listProvince1")
    public List<ReProvince> listProvince1(ReProvince reProvince)
    {
        List<ReProvince> list = reProvinceService.selectReProvinceList(reProvince);
        return list;
    }
    /**
     * 查询省列表
     */
    @GetMapping("/listCity")
    public List<ReCity> listArea(ReCity reProvince)
    {
        List<ReCity> list = reCityService.selectReCityList(reProvince);
        return list;
    }
    @GetMapping("/listCity1")
    public List<ReCity> listArea1(ReCity reProvince)
    {
        List<ReCity> list = reCityService.selectReCityList(reProvince);
        return list;
    }

    /**
     * 查询省列表
     */
    @GetMapping("/listArea")
    public List<ReArea> listArea(ReArea reProvince)
    {
        List<ReArea> list = reAreaService.selectReAreaList(reProvince);
        return list;
    }
    @GetMapping("/listArea1")
    public List<ReArea> listArea1(ReArea reProvince)
    {
        List<ReArea> list = reAreaService.selectReAreaList(reProvince);
        return list;
    }

    /**
     * 查询省列表
     */
    @GetMapping("/listStreet")
    public List<ReStreet> listStreet(ReStreet reProvince)
    {
        List<ReStreet> list = reStreetService.selectReStreetList(reProvince);
        return list;
    }

    @GetMapping("/listStreet1")
    public List<ReStreet> listStreet1(ReStreet reProvince)
    {
        List<ReStreet> list = reStreetService.selectReStreetList(reProvince);
        return list;
    }

    /**
     * 查询省列表
     */
    @GetMapping("/listVillage")
    public List<ReVillage> listArea(ReVillage reProvince)
    {
        List<ReVillage> list = reVillageService.selectReVillageList(reProvince);
        System.out.println(list.toString());
        return list;
    }
    @GetMapping("/listVillage1")
    public List<ReVillage> listArea1(ReVillage reProvince)
    {
        List<ReVillage> list = reVillageService.selectReVillageList(reProvince);
        System.out.println(list.toString());
        return list;
    }

}
